package com.cjy.runnable.demo3;

/**
 * @author Cheng JiYe
 * @description: 实现Runnable接口
 * @date 2021/4/24 23:36
 */
public class MyThread implements Runnable {

  /** 覆写run()方法 */
  @Override
  public void run() {
    for (int i = 0; i < 50; i++) {
      // 取得当前线程的名字
      System.out.println(Thread.currentThread().getName() + "运行，i = " + i);
    }
  }
}
